// Generated from Calc.g4 by ANTLR 4.7.1
package CalcClass;

import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class CalcParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		NOTE_MUL=1, NOTE_SIG=2, ADD=3, SUB=4, MULOP=5, SIG_QUT=6, LEFT_BRA=7, 
		RIGHT_BRA=8, LEFT_BRACKET=9, RIGHT_BRACKET=10, COMMA=11, COLON=12, DOT=13, 
		DOUBLE_DOT=14, SEMICOLON=15, EQUAL=16, TRUE=17, FALSE=18, READ=19, WRITE=20, 
		AND=21, ARRAY=22, BEGIN=23, BOOLEAN=24, CASE=25, CONST=26, DIV=27, DO=28, 
		DOWNTO=29, ELSE=30, END=31, FOR=32, FUNCTION=33, IF=34, INTEGER=35, MOD=36, 
		NOT=37, OF=38, OR=39, PROCEDURE=40, PROGRAM=41, REAL=42, RECORD=43, REPEAT=44, 
		THEN=45, TO=46, TYPE=47, UNTIL=48, VAR=49, WHILE=50, CHAR=51, SIGLETTER=52, 
		ID=53, NUM=54, LETTER=55, DIGIT=56, DIGITS=57, FRACTION=58, RELOP=59, 
		ASSIGNOP=60, SIG_STRING=61, WS=62;
	public static final int
		RULE_s = 0, RULE_program = 1, RULE_program_head = 2, RULE_program_body = 3, 
		RULE_identifier_list = 4, RULE_const_declarations = 5, RULE_const_declaration = 6, 
		RULE_const_variable = 7, RULE_type_declarations = 8, RULE_type_declaration = 9, 
		RULE_type = 10, RULE_standard_type = 11, RULE_record_body = 12, RULE_periods = 13, 
		RULE_period = 14, RULE_var_declarations = 15, RULE_var_declaration = 16, 
		RULE_subprogram_declarations = 17, RULE_subprogram_declaration = 18, RULE_subprogram_head = 19, 
		RULE_formal_parameter = 20, RULE_parameter_lists = 21, RULE_parameter_list = 22, 
		RULE_var_parameter = 23, RULE_value_parameter = 24, RULE_compound_statement = 25, 
		RULE_statement_list = 26, RULE_statement = 27, RULE_variable = 28, RULE_id_varparts = 29, 
		RULE_id_varpart = 30, RULE_else_part = 31, RULE_case_body = 32, RULE_branch_list = 33, 
		RULE_branch = 34, RULE_const_list = 35, RULE_updown = 36, RULE_call_procedure_statement = 37, 
		RULE_expression_list = 38, RULE_expression = 39, RULE_simple_expression = 40, 
		RULE_term = 41, RULE_factor = 42, RULE_unsign_const_variable = 43, RULE_read = 44, 
		RULE_write = 45, RULE_para_table_read = 46, RULE_para_table_write = 47, 
		RULE_booleanEnum = 48;
	public static final String[] ruleNames = {
		"s", "program", "program_head", "program_body", "identifier_list", "const_declarations", 
		"const_declaration", "const_variable", "type_declarations", "type_declaration", 
		"type", "standard_type", "record_body", "periods", "period", "var_declarations", 
		"var_declaration", "subprogram_declarations", "subprogram_declaration", 
		"subprogram_head", "formal_parameter", "parameter_lists", "parameter_list", 
		"var_parameter", "value_parameter", "compound_statement", "statement_list", 
		"statement", "variable", "id_varparts", "id_varpart", "else_part", "case_body", 
		"branch_list", "branch", "const_list", "updown", "call_procedure_statement", 
		"expression_list", "expression", "simple_expression", "term", "factor", 
		"unsign_const_variable", "read", "write", "para_table_read", "para_table_write", 
		"booleanEnum"
	};

	private static final String[] _LITERAL_NAMES = {
		null, null, null, "'+'", "'-'", null, "'''", "'('", "')'", "'['", "']'", 
		"','", "':'", "'.'", "'..'", "';'", "'='", "'true'", "'false'", "'read'", 
		"'write'", "'and'", "'array'", "'begin'", "'boolean'", "'case'", "'const'", 
		"'div'", "'do'", "'downto'", "'else'", "'end'", "'for'", "'function'", 
		"'if'", "'integer'", "'mod'", "'not'", "'of'", "'or'", "'procedure'", 
		"'program'", "'real'", "'record'", "'repeat'", "'then'", "'to'", "'type'", 
		"'until'", "'var'", "'while'", "'char'", null, null, null, null, null, 
		null, null, null, "':='"
	};
	private static final String[] _SYMBOLIC_NAMES = {
		null, "NOTE_MUL", "NOTE_SIG", "ADD", "SUB", "MULOP", "SIG_QUT", "LEFT_BRA", 
		"RIGHT_BRA", "LEFT_BRACKET", "RIGHT_BRACKET", "COMMA", "COLON", "DOT", 
		"DOUBLE_DOT", "SEMICOLON", "EQUAL", "TRUE", "FALSE", "READ", "WRITE", 
		"AND", "ARRAY", "BEGIN", "BOOLEAN", "CASE", "CONST", "DIV", "DO", "DOWNTO", 
		"ELSE", "END", "FOR", "FUNCTION", "IF", "INTEGER", "MOD", "NOT", "OF", 
		"OR", "PROCEDURE", "PROGRAM", "REAL", "RECORD", "REPEAT", "THEN", "TO", 
		"TYPE", "UNTIL", "VAR", "WHILE", "CHAR", "SIGLETTER", "ID", "NUM", "LETTER", 
		"DIGIT", "DIGITS", "FRACTION", "RELOP", "ASSIGNOP", "SIG_STRING", "WS"
	};
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "Calc.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }

	public CalcParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class SContext extends ParserRuleContext {
		public TerminalNode EOF() { return getToken(CalcParser.EOF, 0); }
		public SContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_s; }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitS(this);
			else return visitor.visitChildren(this);
		}
	}

	public final SContext s() throws RecognitionException {
		SContext _localctx = new SContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_s);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(98);
			match(EOF);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ProgramContext extends ParserRuleContext {
		public ProgramContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_program; }
	 
		public ProgramContext() { }
		public void copyFrom(ProgramContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ProgramStartContext extends ProgramContext {
		public Program_headContext program_head() {
			return getRuleContext(Program_headContext.class,0);
		}
		public Program_bodyContext program_body() {
			return getRuleContext(Program_bodyContext.class,0);
		}
		public TerminalNode DOT() { return getToken(CalcParser.DOT, 0); }
		public ProgramStartContext(ProgramContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitProgramStart(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ProgramContext program() throws RecognitionException {
		ProgramContext _localctx = new ProgramContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_program);
		try {
			_localctx = new ProgramStartContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(100);
			program_head();
			setState(101);
			program_body();
			setState(102);
			match(DOT);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Program_headContext extends ParserRuleContext {
		public Program_headContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_program_head; }
	 
		public Program_headContext() { }
		public void copyFrom(Program_headContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ProgramHeadContext extends Program_headContext {
		public TerminalNode PROGRAM() { return getToken(CalcParser.PROGRAM, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Identifier_listContext identifier_list() {
			return getRuleContext(Identifier_listContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public ProgramHeadContext(Program_headContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitProgramHead(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Program_headContext program_head() throws RecognitionException {
		Program_headContext _localctx = new Program_headContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_program_head);
		try {
			_localctx = new ProgramHeadContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(104);
			match(PROGRAM);
			setState(105);
			match(ID);
			setState(106);
			match(LEFT_BRA);
			setState(107);
			identifier_list(0);
			setState(108);
			match(RIGHT_BRA);
			setState(109);
			match(SEMICOLON);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Program_bodyContext extends ParserRuleContext {
		public Program_bodyContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_program_body; }
	 
		public Program_bodyContext() { }
		public void copyFrom(Program_bodyContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ProgramBodyContext extends Program_bodyContext {
		public Compound_statementContext compound_statement() {
			return getRuleContext(Compound_statementContext.class,0);
		}
		public Const_declarationsContext const_declarations() {
			return getRuleContext(Const_declarationsContext.class,0);
		}
		public Type_declarationsContext type_declarations() {
			return getRuleContext(Type_declarationsContext.class,0);
		}
		public Var_declarationsContext var_declarations() {
			return getRuleContext(Var_declarationsContext.class,0);
		}
		public Subprogram_declarationsContext subprogram_declarations() {
			return getRuleContext(Subprogram_declarationsContext.class,0);
		}
		public ProgramBodyContext(Program_bodyContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitProgramBody(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Program_bodyContext program_body() throws RecognitionException {
		Program_bodyContext _localctx = new Program_bodyContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_program_body);
		int _la;
		try {
			_localctx = new ProgramBodyContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(112);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==CONST) {
				{
				setState(111);
				const_declarations();
				}
			}

			setState(115);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==TYPE) {
				{
				setState(114);
				type_declarations();
				}
			}

			setState(118);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==VAR) {
				{
				setState(117);
				var_declarations();
				}
			}

			setState(121);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==FUNCTION || _la==PROCEDURE) {
				{
				setState(120);
				subprogram_declarations(0);
				}
			}

			setState(123);
			compound_statement();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Identifier_listContext extends ParserRuleContext {
		public Identifier_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_identifier_list; }
	 
		public Identifier_listContext() { }
		public void copyFrom(Identifier_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class MultiIdentifierContext extends Identifier_listContext {
		public Identifier_listContext identifier_list() {
			return getRuleContext(Identifier_listContext.class,0);
		}
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public MultiIdentifierContext(Identifier_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitMultiIdentifier(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SigIdentifierContext extends Identifier_listContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public SigIdentifierContext(Identifier_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigIdentifier(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Identifier_listContext identifier_list() throws RecognitionException {
		return identifier_list(0);
	}

	private Identifier_listContext identifier_list(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Identifier_listContext _localctx = new Identifier_listContext(_ctx, _parentState);
		Identifier_listContext _prevctx = _localctx;
		int _startState = 8;
		enterRecursionRule(_localctx, 8, RULE_identifier_list, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new SigIdentifierContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(126);
			match(ID);
			}
			_ctx.stop = _input.LT(-1);
			setState(133);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new MultiIdentifierContext(new Identifier_listContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_identifier_list);
					setState(128);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(129);
					match(COMMA);
					setState(130);
					match(ID);
					}
					} 
				}
				setState(135);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Const_declarationsContext extends ParserRuleContext {
		public Const_declarationsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_const_declarations; }
	 
		public Const_declarationsContext() { }
		public void copyFrom(Const_declarationsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ConstDeclaContext extends Const_declarationsContext {
		public TerminalNode CONST() { return getToken(CalcParser.CONST, 0); }
		public Const_declarationContext const_declaration() {
			return getRuleContext(Const_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public ConstDeclaContext(Const_declarationsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitConstDecla(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Const_declarationsContext const_declarations() throws RecognitionException {
		Const_declarationsContext _localctx = new Const_declarationsContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_const_declarations);
		try {
			_localctx = new ConstDeclaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(136);
			match(CONST);
			setState(137);
			const_declaration(0);
			setState(138);
			match(SEMICOLON);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Const_declarationContext extends ParserRuleContext {
		public Const_declarationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_const_declaration; }
	 
		public Const_declarationContext() { }
		public void copyFrom(Const_declarationContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class MultiConstExtContext extends Const_declarationContext {
		public Const_declarationContext const_declaration() {
			return getRuleContext(Const_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode EQUAL() { return getToken(CalcParser.EQUAL, 0); }
		public Const_variableContext const_variable() {
			return getRuleContext(Const_variableContext.class,0);
		}
		public MultiConstExtContext(Const_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitMultiConstExt(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SigConstExtContext extends Const_declarationContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode EQUAL() { return getToken(CalcParser.EQUAL, 0); }
		public Const_variableContext const_variable() {
			return getRuleContext(Const_variableContext.class,0);
		}
		public SigConstExtContext(Const_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigConstExt(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Const_declarationContext const_declaration() throws RecognitionException {
		return const_declaration(0);
	}

	private Const_declarationContext const_declaration(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Const_declarationContext _localctx = new Const_declarationContext(_ctx, _parentState);
		Const_declarationContext _prevctx = _localctx;
		int _startState = 12;
		enterRecursionRule(_localctx, 12, RULE_const_declaration, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new SigConstExtContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(141);
			match(ID);
			setState(142);
			match(EQUAL);
			setState(143);
			const_variable();
			}
			_ctx.stop = _input.LT(-1);
			setState(152);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new MultiConstExtContext(new Const_declarationContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_const_declaration);
					setState(145);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(146);
					match(SEMICOLON);
					setState(147);
					match(ID);
					setState(148);
					match(EQUAL);
					setState(149);
					const_variable();
					}
					} 
				}
				setState(154);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Const_variableContext extends ParserRuleContext {
		public Const_variableContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_const_variable; }
	 
		public Const_variableContext() { }
		public void copyFrom(Const_variableContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SubIDContext extends Const_variableContext {
		public TerminalNode SUB() { return getToken(CalcParser.SUB, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public SubIDContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSubID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class AddNumContext extends Const_variableContext {
		public TerminalNode ADD() { return getToken(CalcParser.ADD, 0); }
		public TerminalNode NUM() { return getToken(CalcParser.NUM, 0); }
		public AddNumContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitAddNum(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SigNumContext extends Const_variableContext {
		public TerminalNode NUM() { return getToken(CalcParser.NUM, 0); }
		public SigNumContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigNum(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SigLetterContext extends Const_variableContext {
		public TerminalNode SIGLETTER() { return getToken(CalcParser.SIGLETTER, 0); }
		public SigLetterContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigLetter(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class AddIDContext extends Const_variableContext {
		public TerminalNode ADD() { return getToken(CalcParser.ADD, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public AddIDContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitAddID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SigIDContext extends Const_variableContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public SigIDContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SubNumContext extends Const_variableContext {
		public TerminalNode SUB() { return getToken(CalcParser.SUB, 0); }
		public TerminalNode NUM() { return getToken(CalcParser.NUM, 0); }
		public SubNumContext(Const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSubNum(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Const_variableContext const_variable() throws RecognitionException {
		Const_variableContext _localctx = new Const_variableContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_const_variable);
		try {
			setState(166);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
			case 1:
				_localctx = new AddIDContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(155);
				match(ADD);
				setState(156);
				match(ID);
				}
				break;
			case 2:
				_localctx = new SubIDContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(157);
				match(SUB);
				setState(158);
				match(ID);
				}
				break;
			case 3:
				_localctx = new SigIDContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(159);
				match(ID);
				}
				break;
			case 4:
				_localctx = new AddNumContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(160);
				match(ADD);
				setState(161);
				match(NUM);
				}
				break;
			case 5:
				_localctx = new SubNumContext(_localctx);
				enterOuterAlt(_localctx, 5);
				{
				setState(162);
				match(SUB);
				setState(163);
				match(NUM);
				}
				break;
			case 6:
				_localctx = new SigNumContext(_localctx);
				enterOuterAlt(_localctx, 6);
				{
				setState(164);
				match(NUM);
				}
				break;
			case 7:
				_localctx = new SigLetterContext(_localctx);
				enterOuterAlt(_localctx, 7);
				{
				setState(165);
				match(SIGLETTER);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Type_declarationsContext extends ParserRuleContext {
		public Type_declarationsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type_declarations; }
	 
		public Type_declarationsContext() { }
		public void copyFrom(Type_declarationsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class TypeDeclaContext extends Type_declarationsContext {
		public TerminalNode TYPE() { return getToken(CalcParser.TYPE, 0); }
		public Type_declarationContext type_declaration() {
			return getRuleContext(Type_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public TypeDeclaContext(Type_declarationsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitTypeDecla(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Type_declarationsContext type_declarations() throws RecognitionException {
		Type_declarationsContext _localctx = new Type_declarationsContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_type_declarations);
		try {
			_localctx = new TypeDeclaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(168);
			match(TYPE);
			setState(169);
			type_declaration(0);
			setState(170);
			match(SEMICOLON);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Type_declarationContext extends ParserRuleContext {
		public Type_declarationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type_declaration; }
	 
		public Type_declarationContext() { }
		public void copyFrom(Type_declarationContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SigTypeContext extends Type_declarationContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode EQUAL() { return getToken(CalcParser.EQUAL, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public SigTypeContext(Type_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigType(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class MultiTypeContext extends Type_declarationContext {
		public Type_declarationContext type_declaration() {
			return getRuleContext(Type_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode EQUAL() { return getToken(CalcParser.EQUAL, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public MultiTypeContext(Type_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitMultiType(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Type_declarationContext type_declaration() throws RecognitionException {
		return type_declaration(0);
	}

	private Type_declarationContext type_declaration(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Type_declarationContext _localctx = new Type_declarationContext(_ctx, _parentState);
		Type_declarationContext _prevctx = _localctx;
		int _startState = 18;
		enterRecursionRule(_localctx, 18, RULE_type_declaration, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new SigTypeContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(173);
			match(ID);
			setState(174);
			match(EQUAL);
			setState(175);
			type();
			}
			_ctx.stop = _input.LT(-1);
			setState(184);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new MultiTypeContext(new Type_declarationContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_type_declaration);
					setState(177);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(178);
					match(SEMICOLON);
					setState(179);
					match(ID);
					setState(180);
					match(EQUAL);
					setState(181);
					type();
					}
					} 
				}
				setState(186);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class TypeContext extends ParserRuleContext {
		public TypeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type; }
	 
		public TypeContext() { }
		public void copyFrom(TypeContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class BaseTypeExtContext extends TypeContext {
		public Standard_typeContext standard_type() {
			return getRuleContext(Standard_typeContext.class,0);
		}
		public BaseTypeExtContext(TypeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitBaseTypeExt(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class PeriodExtContext extends TypeContext {
		public TerminalNode ARRAY() { return getToken(CalcParser.ARRAY, 0); }
		public TerminalNode LEFT_BRACKET() { return getToken(CalcParser.LEFT_BRACKET, 0); }
		public PeriodsContext periods() {
			return getRuleContext(PeriodsContext.class,0);
		}
		public TerminalNode RIGHT_BRACKET() { return getToken(CalcParser.RIGHT_BRACKET, 0); }
		public TerminalNode OF() { return getToken(CalcParser.OF, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public PeriodExtContext(TypeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitPeriodExt(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class DefinedRecordContext extends TypeContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public DefinedRecordContext(TypeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitDefinedRecord(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class RecordExtContext extends TypeContext {
		public TerminalNode RECORD() { return getToken(CalcParser.RECORD, 0); }
		public TerminalNode END() { return getToken(CalcParser.END, 0); }
		public Record_bodyContext record_body() {
			return getRuleContext(Record_bodyContext.class,0);
		}
		public RecordExtContext(TypeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitRecordExt(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TypeContext type() throws RecognitionException {
		TypeContext _localctx = new TypeContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_type);
		int _la;
		try {
			setState(201);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case BOOLEAN:
			case INTEGER:
			case REAL:
			case CHAR:
				_localctx = new BaseTypeExtContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(187);
				standard_type();
				}
				break;
			case RECORD:
				_localctx = new RecordExtContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(188);
				match(RECORD);
				setState(190);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==ID) {
					{
					setState(189);
					record_body();
					}
				}

				setState(192);
				match(END);
				}
				break;
			case ARRAY:
				_localctx = new PeriodExtContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(193);
				match(ARRAY);
				setState(194);
				match(LEFT_BRACKET);
				setState(195);
				periods(0);
				setState(196);
				match(RIGHT_BRACKET);
				setState(197);
				match(OF);
				setState(198);
				type();
				}
				break;
			case ID:
				_localctx = new DefinedRecordContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(200);
				match(ID);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Standard_typeContext extends ParserRuleContext {
		public TerminalNode INTEGER() { return getToken(CalcParser.INTEGER, 0); }
		public TerminalNode REAL() { return getToken(CalcParser.REAL, 0); }
		public TerminalNode BOOLEAN() { return getToken(CalcParser.BOOLEAN, 0); }
		public TerminalNode CHAR() { return getToken(CalcParser.CHAR, 0); }
		public Standard_typeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_standard_type; }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitStandard_type(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Standard_typeContext standard_type() throws RecognitionException {
		Standard_typeContext _localctx = new Standard_typeContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_standard_type);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(203);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << INTEGER) | (1L << REAL) | (1L << CHAR))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Record_bodyContext extends ParserRuleContext {
		public Record_bodyContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_record_body; }
	 
		public Record_bodyContext() { }
		public void copyFrom(Record_bodyContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class RecordBodyContext extends Record_bodyContext {
		public Var_declarationContext var_declaration() {
			return getRuleContext(Var_declarationContext.class,0);
		}
		public RecordBodyContext(Record_bodyContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitRecordBody(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Record_bodyContext record_body() throws RecognitionException {
		Record_bodyContext _localctx = new Record_bodyContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_record_body);
		try {
			_localctx = new RecordBodyContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(205);
			var_declaration(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class PeriodsContext extends ParserRuleContext {
		public PeriodsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_periods; }
	 
		public PeriodsContext() { }
		public void copyFrom(PeriodsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetPeriodListContext extends PeriodsContext {
		public PeriodsContext periods() {
			return getRuleContext(PeriodsContext.class,0);
		}
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public PeriodContext period() {
			return getRuleContext(PeriodContext.class,0);
		}
		public GetPeriodListContext(PeriodsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetPeriodList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSigPeriodContext extends PeriodsContext {
		public PeriodContext period() {
			return getRuleContext(PeriodContext.class,0);
		}
		public GetSigPeriodContext(PeriodsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigPeriod(this);
			else return visitor.visitChildren(this);
		}
	}

	public final PeriodsContext periods() throws RecognitionException {
		return periods(0);
	}

	private PeriodsContext periods(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		PeriodsContext _localctx = new PeriodsContext(_ctx, _parentState);
		PeriodsContext _prevctx = _localctx;
		int _startState = 26;
		enterRecursionRule(_localctx, 26, RULE_periods, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigPeriodContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(208);
			period();
			}
			_ctx.stop = _input.LT(-1);
			setState(215);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetPeriodListContext(new PeriodsContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_periods);
					setState(210);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(211);
					match(COMMA);
					setState(212);
					period();
					}
					} 
				}
				setState(217);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class PeriodContext extends ParserRuleContext {
		public PeriodContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_period; }
	 
		public PeriodContext() { }
		public void copyFrom(PeriodContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetPeriodContext extends PeriodContext {
		public List<Const_variableContext> const_variable() {
			return getRuleContexts(Const_variableContext.class);
		}
		public Const_variableContext const_variable(int i) {
			return getRuleContext(Const_variableContext.class,i);
		}
		public TerminalNode DOUBLE_DOT() { return getToken(CalcParser.DOUBLE_DOT, 0); }
		public GetPeriodContext(PeriodContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetPeriod(this);
			else return visitor.visitChildren(this);
		}
	}

	public final PeriodContext period() throws RecognitionException {
		PeriodContext _localctx = new PeriodContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_period);
		try {
			_localctx = new GetPeriodContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(218);
			const_variable();
			setState(219);
			match(DOUBLE_DOT);
			setState(220);
			const_variable();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Var_declarationsContext extends ParserRuleContext {
		public Var_declarationsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_var_declarations; }
	 
		public Var_declarationsContext() { }
		public void copyFrom(Var_declarationsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class VarDeclaContext extends Var_declarationsContext {
		public TerminalNode VAR() { return getToken(CalcParser.VAR, 0); }
		public Var_declarationContext var_declaration() {
			return getRuleContext(Var_declarationContext.class,0);
		}
		public VarDeclaContext(Var_declarationsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitVarDecla(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Var_declarationsContext var_declarations() throws RecognitionException {
		Var_declarationsContext _localctx = new Var_declarationsContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_var_declarations);
		try {
			_localctx = new VarDeclaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(222);
			match(VAR);
			setState(223);
			var_declaration(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Var_declarationContext extends ParserRuleContext {
		public Var_declarationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_var_declaration; }
	 
		public Var_declarationContext() { }
		public void copyFrom(Var_declarationContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetVarDeclaListContext extends Var_declarationContext {
		public Var_declarationContext var_declaration() {
			return getRuleContext(Var_declarationContext.class,0);
		}
		public Identifier_listContext identifier_list() {
			return getRuleContext(Identifier_listContext.class,0);
		}
		public TerminalNode COLON() { return getToken(CalcParser.COLON, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetVarDeclaListContext(Var_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetVarDeclaList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSigVarDeclaContext extends Var_declarationContext {
		public Identifier_listContext identifier_list() {
			return getRuleContext(Identifier_listContext.class,0);
		}
		public TerminalNode COLON() { return getToken(CalcParser.COLON, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetSigVarDeclaContext(Var_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigVarDecla(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Var_declarationContext var_declaration() throws RecognitionException {
		return var_declaration(0);
	}

	private Var_declarationContext var_declaration(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Var_declarationContext _localctx = new Var_declarationContext(_ctx, _parentState);
		Var_declarationContext _prevctx = _localctx;
		int _startState = 32;
		enterRecursionRule(_localctx, 32, RULE_var_declaration, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigVarDeclaContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(226);
			identifier_list(0);
			setState(227);
			match(COLON);
			setState(228);
			type();
			setState(229);
			match(SEMICOLON);
			}
			_ctx.stop = _input.LT(-1);
			setState(239);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetVarDeclaListContext(new Var_declarationContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_var_declaration);
					setState(231);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(232);
					identifier_list(0);
					setState(233);
					match(COLON);
					setState(234);
					type();
					setState(235);
					match(SEMICOLON);
					}
					} 
				}
				setState(241);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Subprogram_declarationsContext extends ParserRuleContext {
		public Subprogram_declarationsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_subprogram_declarations; }
	 
		public Subprogram_declarationsContext() { }
		public void copyFrom(Subprogram_declarationsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetSigSubProDeclaContext extends Subprogram_declarationsContext {
		public Subprogram_declarationContext subprogram_declaration() {
			return getRuleContext(Subprogram_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetSigSubProDeclaContext(Subprogram_declarationsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigSubProDecla(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSubProDeclaListContext extends Subprogram_declarationsContext {
		public Subprogram_declarationsContext subprogram_declarations() {
			return getRuleContext(Subprogram_declarationsContext.class,0);
		}
		public Subprogram_declarationContext subprogram_declaration() {
			return getRuleContext(Subprogram_declarationContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetSubProDeclaListContext(Subprogram_declarationsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSubProDeclaList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Subprogram_declarationsContext subprogram_declarations() throws RecognitionException {
		return subprogram_declarations(0);
	}

	private Subprogram_declarationsContext subprogram_declarations(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Subprogram_declarationsContext _localctx = new Subprogram_declarationsContext(_ctx, _parentState);
		Subprogram_declarationsContext _prevctx = _localctx;
		int _startState = 34;
		enterRecursionRule(_localctx, 34, RULE_subprogram_declarations, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigSubProDeclaContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(243);
			subprogram_declaration();
			setState(244);
			match(SEMICOLON);
			}
			_ctx.stop = _input.LT(-1);
			setState(252);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetSubProDeclaListContext(new Subprogram_declarationsContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_subprogram_declarations);
					setState(246);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(247);
					subprogram_declaration();
					setState(248);
					match(SEMICOLON);
					}
					} 
				}
				setState(254);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Subprogram_declarationContext extends ParserRuleContext {
		public Subprogram_declarationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_subprogram_declaration; }
	 
		public Subprogram_declarationContext() { }
		public void copyFrom(Subprogram_declarationContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SubProgramDeclaContext extends Subprogram_declarationContext {
		public Subprogram_headContext subprogram_head() {
			return getRuleContext(Subprogram_headContext.class,0);
		}
		public Program_bodyContext program_body() {
			return getRuleContext(Program_bodyContext.class,0);
		}
		public SubProgramDeclaContext(Subprogram_declarationContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSubProgramDecla(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Subprogram_declarationContext subprogram_declaration() throws RecognitionException {
		Subprogram_declarationContext _localctx = new Subprogram_declarationContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_subprogram_declaration);
		try {
			_localctx = new SubProgramDeclaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(255);
			subprogram_head();
			setState(256);
			program_body();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Subprogram_headContext extends ParserRuleContext {
		public Subprogram_headContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_subprogram_head; }
	 
		public Subprogram_headContext() { }
		public void copyFrom(Subprogram_headContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ProSubProgramContext extends Subprogram_headContext {
		public TerminalNode PROCEDURE() { return getToken(CalcParser.PROCEDURE, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public Formal_parameterContext formal_parameter() {
			return getRuleContext(Formal_parameterContext.class,0);
		}
		public ProSubProgramContext(Subprogram_headContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitProSubProgram(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class FuncSubProgramContext extends Subprogram_headContext {
		public TerminalNode FUNCTION() { return getToken(CalcParser.FUNCTION, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode COLON() { return getToken(CalcParser.COLON, 0); }
		public Standard_typeContext standard_type() {
			return getRuleContext(Standard_typeContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public Formal_parameterContext formal_parameter() {
			return getRuleContext(Formal_parameterContext.class,0);
		}
		public FuncSubProgramContext(Subprogram_headContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitFuncSubProgram(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Subprogram_headContext subprogram_head() throws RecognitionException {
		Subprogram_headContext _localctx = new Subprogram_headContext(_ctx, getState());
		enterRule(_localctx, 38, RULE_subprogram_head);
		int _la;
		try {
			setState(273);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case FUNCTION:
				_localctx = new FuncSubProgramContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(258);
				match(FUNCTION);
				setState(259);
				match(ID);
				setState(261);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==LEFT_BRA) {
					{
					setState(260);
					formal_parameter();
					}
				}

				setState(263);
				match(COLON);
				setState(264);
				standard_type();
				setState(265);
				match(SEMICOLON);
				}
				break;
			case PROCEDURE:
				_localctx = new ProSubProgramContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(267);
				match(PROCEDURE);
				setState(268);
				match(ID);
				setState(270);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==LEFT_BRA) {
					{
					setState(269);
					formal_parameter();
					}
				}

				setState(272);
				match(SEMICOLON);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Formal_parameterContext extends ParserRuleContext {
		public Formal_parameterContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_formal_parameter; }
	 
		public Formal_parameterContext() { }
		public void copyFrom(Formal_parameterContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class FormalParaContext extends Formal_parameterContext {
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Parameter_listsContext parameter_lists() {
			return getRuleContext(Parameter_listsContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public FormalParaContext(Formal_parameterContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitFormalPara(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Formal_parameterContext formal_parameter() throws RecognitionException {
		Formal_parameterContext _localctx = new Formal_parameterContext(_ctx, getState());
		enterRule(_localctx, 40, RULE_formal_parameter);
		try {
			_localctx = new FormalParaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(275);
			match(LEFT_BRA);
			setState(276);
			parameter_lists(0);
			setState(277);
			match(RIGHT_BRA);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Parameter_listsContext extends ParserRuleContext {
		public Parameter_listsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_parameter_lists; }
	 
		public Parameter_listsContext() { }
		public void copyFrom(Parameter_listsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetSigParaListContext extends Parameter_listsContext {
		public Parameter_listContext parameter_list() {
			return getRuleContext(Parameter_listContext.class,0);
		}
		public GetSigParaListContext(Parameter_listsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigParaList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetParaListsContext extends Parameter_listsContext {
		public Parameter_listsContext parameter_lists() {
			return getRuleContext(Parameter_listsContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public Parameter_listContext parameter_list() {
			return getRuleContext(Parameter_listContext.class,0);
		}
		public GetParaListsContext(Parameter_listsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetParaLists(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Parameter_listsContext parameter_lists() throws RecognitionException {
		return parameter_lists(0);
	}

	private Parameter_listsContext parameter_lists(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Parameter_listsContext _localctx = new Parameter_listsContext(_ctx, _parentState);
		Parameter_listsContext _prevctx = _localctx;
		int _startState = 42;
		enterRecursionRule(_localctx, 42, RULE_parameter_lists, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigParaListContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(280);
			parameter_list();
			}
			_ctx.stop = _input.LT(-1);
			setState(287);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetParaListsContext(new Parameter_listsContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_parameter_lists);
					setState(282);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(283);
					match(SEMICOLON);
					setState(284);
					parameter_list();
					}
					} 
				}
				setState(289);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Parameter_listContext extends ParserRuleContext {
		public Parameter_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_parameter_list; }
	 
		public Parameter_listContext() { }
		public void copyFrom(Parameter_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ParaVarContext extends Parameter_listContext {
		public Var_parameterContext var_parameter() {
			return getRuleContext(Var_parameterContext.class,0);
		}
		public ParaVarContext(Parameter_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitParaVar(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ParaValueContext extends Parameter_listContext {
		public Value_parameterContext value_parameter() {
			return getRuleContext(Value_parameterContext.class,0);
		}
		public ParaValueContext(Parameter_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitParaValue(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Parameter_listContext parameter_list() throws RecognitionException {
		Parameter_listContext _localctx = new Parameter_listContext(_ctx, getState());
		enterRule(_localctx, 44, RULE_parameter_list);
		try {
			setState(292);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case VAR:
				_localctx = new ParaVarContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(290);
				var_parameter();
				}
				break;
			case ID:
				_localctx = new ParaValueContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(291);
				value_parameter();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Var_parameterContext extends ParserRuleContext {
		public Var_parameterContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_var_parameter; }
	 
		public Var_parameterContext() { }
		public void copyFrom(Var_parameterContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class VarParaContext extends Var_parameterContext {
		public TerminalNode VAR() { return getToken(CalcParser.VAR, 0); }
		public Value_parameterContext value_parameter() {
			return getRuleContext(Value_parameterContext.class,0);
		}
		public VarParaContext(Var_parameterContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitVarPara(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Var_parameterContext var_parameter() throws RecognitionException {
		Var_parameterContext _localctx = new Var_parameterContext(_ctx, getState());
		enterRule(_localctx, 46, RULE_var_parameter);
		try {
			_localctx = new VarParaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(294);
			match(VAR);
			setState(295);
			value_parameter();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Value_parameterContext extends ParserRuleContext {
		public Value_parameterContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_value_parameter; }
	 
		public Value_parameterContext() { }
		public void copyFrom(Value_parameterContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ValueParaAssignContext extends Value_parameterContext {
		public Identifier_listContext identifier_list() {
			return getRuleContext(Identifier_listContext.class,0);
		}
		public TerminalNode COLON() { return getToken(CalcParser.COLON, 0); }
		public Standard_typeContext standard_type() {
			return getRuleContext(Standard_typeContext.class,0);
		}
		public ValueParaAssignContext(Value_parameterContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitValueParaAssign(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Value_parameterContext value_parameter() throws RecognitionException {
		Value_parameterContext _localctx = new Value_parameterContext(_ctx, getState());
		enterRule(_localctx, 48, RULE_value_parameter);
		try {
			_localctx = new ValueParaAssignContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(297);
			identifier_list(0);
			setState(298);
			match(COLON);
			setState(299);
			standard_type();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Compound_statementContext extends ParserRuleContext {
		public Compound_statementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_compound_statement; }
	 
		public Compound_statementContext() { }
		public void copyFrom(Compound_statementContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class NullStatementContext extends Compound_statementContext {
		public TerminalNode BEGIN() { return getToken(CalcParser.BEGIN, 0); }
		public TerminalNode END() { return getToken(CalcParser.END, 0); }
		public NullStatementContext(Compound_statementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitNullStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetComStatementListContext extends Compound_statementContext {
		public TerminalNode BEGIN() { return getToken(CalcParser.BEGIN, 0); }
		public Statement_listContext statement_list() {
			return getRuleContext(Statement_listContext.class,0);
		}
		public TerminalNode END() { return getToken(CalcParser.END, 0); }
		public GetComStatementListContext(Compound_statementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetComStatementList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Compound_statementContext compound_statement() throws RecognitionException {
		Compound_statementContext _localctx = new Compound_statementContext(_ctx, getState());
		enterRule(_localctx, 50, RULE_compound_statement);
		try {
			setState(307);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
			case 1:
				_localctx = new GetComStatementListContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(301);
				match(BEGIN);
				setState(302);
				statement_list(0);
				setState(303);
				match(END);
				}
				break;
			case 2:
				_localctx = new NullStatementContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(305);
				match(BEGIN);
				setState(306);
				match(END);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Statement_listContext extends ParserRuleContext {
		public Statement_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statement_list; }
	 
		public Statement_listContext() { }
		public void copyFrom(Statement_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetSigStatementContext extends Statement_listContext {
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetSigStatementContext(Statement_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetStatementListContext extends Statement_listContext {
		public Statement_listContext statement_list() {
			return getRuleContext(Statement_listContext.class,0);
		}
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetStatementListContext(Statement_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetStatementList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Statement_listContext statement_list() throws RecognitionException {
		return statement_list(0);
	}

	private Statement_listContext statement_list(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Statement_listContext _localctx = new Statement_listContext(_ctx, _parentState);
		Statement_listContext _prevctx = _localctx;
		int _startState = 52;
		enterRecursionRule(_localctx, 52, RULE_statement_list, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigStatementContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(310);
			statement();
			setState(311);
			match(SEMICOLON);
			}
			_ctx.stop = _input.LT(-1);
			setState(319);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,19,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetStatementListContext(new Statement_listContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_statement_list);
					setState(313);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(314);
					statement();
					setState(315);
					match(SEMICOLON);
					}
					} 
				}
				setState(321);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,19,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class StatementContext extends ParserRuleContext {
		public StatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statement; }
	 
		public StatementContext() { }
		public void copyFrom(StatementContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class WhileStatementContext extends StatementContext {
		public TerminalNode WHILE() { return getToken(CalcParser.WHILE, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode DO() { return getToken(CalcParser.DO, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public WhileStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitWhileStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class WriteStatementContext extends StatementContext {
		public WriteContext write() {
			return getRuleContext(WriteContext.class,0);
		}
		public WriteStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitWriteStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class RepeatStatementContext extends StatementContext {
		public TerminalNode REPEAT() { return getToken(CalcParser.REPEAT, 0); }
		public Statement_listContext statement_list() {
			return getRuleContext(Statement_listContext.class,0);
		}
		public TerminalNode UNTIL() { return getToken(CalcParser.UNTIL, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public RepeatStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitRepeatStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ComStatementContext extends StatementContext {
		public Compound_statementContext compound_statement() {
			return getRuleContext(Compound_statementContext.class,0);
		}
		public ComStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitComStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class CaseStatementContext extends StatementContext {
		public TerminalNode CASE() { return getToken(CalcParser.CASE, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode OF() { return getToken(CalcParser.OF, 0); }
		public Case_bodyContext case_body() {
			return getRuleContext(Case_bodyContext.class,0);
		}
		public TerminalNode END() { return getToken(CalcParser.END, 0); }
		public CaseStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitCaseStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class AssignStatementContext extends StatementContext {
		public VariableContext variable() {
			return getRuleContext(VariableContext.class,0);
		}
		public TerminalNode ASSIGNOP() { return getToken(CalcParser.ASSIGNOP, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public AssignStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitAssignStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ReadStatementContext extends StatementContext {
		public ReadContext read() {
			return getRuleContext(ReadContext.class,0);
		}
		public ReadStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitReadStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ForStatementContext extends StatementContext {
		public TerminalNode FOR() { return getToken(CalcParser.FOR, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode ASSIGNOP() { return getToken(CalcParser.ASSIGNOP, 0); }
		public List<ExpressionContext> expression() {
			return getRuleContexts(ExpressionContext.class);
		}
		public ExpressionContext expression(int i) {
			return getRuleContext(ExpressionContext.class,i);
		}
		public UpdownContext updown() {
			return getRuleContext(UpdownContext.class,0);
		}
		public TerminalNode DO() { return getToken(CalcParser.DO, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public ForStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitForStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class IfStatementContext extends StatementContext {
		public TerminalNode IF() { return getToken(CalcParser.IF, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode THEN() { return getToken(CalcParser.THEN, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public Else_partContext else_part() {
			return getRuleContext(Else_partContext.class,0);
		}
		public IfStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitIfStatement(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ProCallStatementContext extends StatementContext {
		public Call_procedure_statementContext call_procedure_statement() {
			return getRuleContext(Call_procedure_statementContext.class,0);
		}
		public ProCallStatementContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitProCallStatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final StatementContext statement() throws RecognitionException {
		StatementContext _localctx = new StatementContext(_ctx, getState());
		enterRule(_localctx, 54, RULE_statement);
		try {
			setState(362);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) {
			case 1:
				_localctx = new AssignStatementContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(322);
				variable();
				setState(323);
				match(ASSIGNOP);
				setState(324);
				expression();
				}
				break;
			case 2:
				_localctx = new ProCallStatementContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(326);
				call_procedure_statement();
				}
				break;
			case 3:
				_localctx = new ComStatementContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(327);
				compound_statement();
				}
				break;
			case 4:
				_localctx = new WriteStatementContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(328);
				write();
				}
				break;
			case 5:
				_localctx = new ReadStatementContext(_localctx);
				enterOuterAlt(_localctx, 5);
				{
				setState(329);
				read();
				}
				break;
			case 6:
				_localctx = new IfStatementContext(_localctx);
				enterOuterAlt(_localctx, 6);
				{
				setState(330);
				match(IF);
				setState(331);
				expression();
				setState(332);
				match(THEN);
				setState(333);
				statement();
				setState(335);
				_errHandler.sync(this);
				switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) {
				case 1:
					{
					setState(334);
					else_part();
					}
					break;
				}
				}
				break;
			case 7:
				_localctx = new CaseStatementContext(_localctx);
				enterOuterAlt(_localctx, 7);
				{
				setState(337);
				match(CASE);
				setState(338);
				expression();
				setState(339);
				match(OF);
				setState(340);
				case_body();
				setState(341);
				match(END);
				}
				break;
			case 8:
				_localctx = new WhileStatementContext(_localctx);
				enterOuterAlt(_localctx, 8);
				{
				setState(343);
				match(WHILE);
				setState(344);
				expression();
				setState(345);
				match(DO);
				setState(346);
				statement();
				}
				break;
			case 9:
				_localctx = new RepeatStatementContext(_localctx);
				enterOuterAlt(_localctx, 9);
				{
				setState(348);
				match(REPEAT);
				setState(349);
				statement_list(0);
				setState(350);
				match(UNTIL);
				setState(351);
				expression();
				}
				break;
			case 10:
				_localctx = new ForStatementContext(_localctx);
				enterOuterAlt(_localctx, 10);
				{
				setState(353);
				match(FOR);
				setState(354);
				match(ID);
				setState(355);
				match(ASSIGNOP);
				setState(356);
				expression();
				setState(357);
				updown();
				setState(358);
				expression();
				setState(359);
				match(DO);
				setState(360);
				statement();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class VariableContext extends ParserRuleContext {
		public VariableContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_variable; }
	 
		public VariableContext() { }
		public void copyFrom(VariableContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetSigIDContext extends VariableContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public GetSigIDContext(VariableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetIDVarPartListContext extends VariableContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public Id_varpartsContext id_varparts() {
			return getRuleContext(Id_varpartsContext.class,0);
		}
		public GetIDVarPartListContext(VariableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetIDVarPartList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final VariableContext variable() throws RecognitionException {
		VariableContext _localctx = new VariableContext(_ctx, getState());
		enterRule(_localctx, 56, RULE_variable);
		try {
			setState(367);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) {
			case 1:
				_localctx = new GetIDVarPartListContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(364);
				match(ID);
				setState(365);
				id_varparts(0);
				}
				break;
			case 2:
				_localctx = new GetSigIDContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(366);
				match(ID);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Id_varpartsContext extends ParserRuleContext {
		public Id_varpartsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_id_varparts; }
	 
		public Id_varpartsContext() { }
		public void copyFrom(Id_varpartsContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetIDVarListContext extends Id_varpartsContext {
		public Id_varpartsContext id_varparts() {
			return getRuleContext(Id_varpartsContext.class,0);
		}
		public Id_varpartContext id_varpart() {
			return getRuleContext(Id_varpartContext.class,0);
		}
		public GetIDVarListContext(Id_varpartsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetIDVarList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSigIDVarContext extends Id_varpartsContext {
		public Id_varpartContext id_varpart() {
			return getRuleContext(Id_varpartContext.class,0);
		}
		public GetSigIDVarContext(Id_varpartsContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigIDVar(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Id_varpartsContext id_varparts() throws RecognitionException {
		return id_varparts(0);
	}

	private Id_varpartsContext id_varparts(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Id_varpartsContext _localctx = new Id_varpartsContext(_ctx, _parentState);
		Id_varpartsContext _prevctx = _localctx;
		int _startState = 58;
		enterRecursionRule(_localctx, 58, RULE_id_varparts, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigIDVarContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(370);
			id_varpart();
			}
			_ctx.stop = _input.LT(-1);
			setState(376);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,23,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetIDVarListContext(new Id_varpartsContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_id_varparts);
					setState(372);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(373);
					id_varpart();
					}
					} 
				}
				setState(378);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,23,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class Id_varpartContext extends ParserRuleContext {
		public Id_varpartContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_id_varpart; }
	 
		public Id_varpartContext() { }
		public void copyFrom(Id_varpartContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ExpIDContext extends Id_varpartContext {
		public TerminalNode LEFT_BRACKET() { return getToken(CalcParser.LEFT_BRACKET, 0); }
		public Expression_listContext expression_list() {
			return getRuleContext(Expression_listContext.class,0);
		}
		public TerminalNode RIGHT_BRACKET() { return getToken(CalcParser.RIGHT_BRACKET, 0); }
		public ExpIDContext(Id_varpartContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitExpID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class FieldIDContext extends Id_varpartContext {
		public TerminalNode DOT() { return getToken(CalcParser.DOT, 0); }
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public FieldIDContext(Id_varpartContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitFieldID(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Id_varpartContext id_varpart() throws RecognitionException {
		Id_varpartContext _localctx = new Id_varpartContext(_ctx, getState());
		enterRule(_localctx, 60, RULE_id_varpart);
		try {
			setState(385);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case LEFT_BRACKET:
				_localctx = new ExpIDContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(379);
				match(LEFT_BRACKET);
				setState(380);
				expression_list(0);
				setState(381);
				match(RIGHT_BRACKET);
				}
				break;
			case DOT:
				_localctx = new FieldIDContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(383);
				match(DOT);
				setState(384);
				match(ID);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Else_partContext extends ParserRuleContext {
		public Else_partContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_else_part; }
	 
		public Else_partContext() { }
		public void copyFrom(Else_partContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ElsePartContext extends Else_partContext {
		public TerminalNode ELSE() { return getToken(CalcParser.ELSE, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public ElsePartContext(Else_partContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitElsePart(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Else_partContext else_part() throws RecognitionException {
		Else_partContext _localctx = new Else_partContext(_ctx, getState());
		enterRule(_localctx, 62, RULE_else_part);
		try {
			_localctx = new ElsePartContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(387);
			match(ELSE);
			setState(388);
			statement();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Case_bodyContext extends ParserRuleContext {
		public Case_bodyContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_case_body; }
	 
		public Case_bodyContext() { }
		public void copyFrom(Case_bodyContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetBranchBodyContext extends Case_bodyContext {
		public Branch_listContext branch_list() {
			return getRuleContext(Branch_listContext.class,0);
		}
		public GetBranchBodyContext(Case_bodyContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetBranchBody(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Case_bodyContext case_body() throws RecognitionException {
		Case_bodyContext _localctx = new Case_bodyContext(_ctx, getState());
		enterRule(_localctx, 64, RULE_case_body);
		int _la;
		try {
			_localctx = new GetBranchBodyContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(391);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << SUB) | (1L << SIGLETTER) | (1L << ID) | (1L << NUM))) != 0)) {
				{
				setState(390);
				branch_list(0);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Branch_listContext extends ParserRuleContext {
		public Branch_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_branch_list; }
	 
		public Branch_listContext() { }
		public void copyFrom(Branch_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetSigBranchContext extends Branch_listContext {
		public BranchContext branch() {
			return getRuleContext(BranchContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetSigBranchContext(Branch_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigBranch(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetBranchListContext extends Branch_listContext {
		public Branch_listContext branch_list() {
			return getRuleContext(Branch_listContext.class,0);
		}
		public BranchContext branch() {
			return getRuleContext(BranchContext.class,0);
		}
		public TerminalNode SEMICOLON() { return getToken(CalcParser.SEMICOLON, 0); }
		public GetBranchListContext(Branch_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetBranchList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Branch_listContext branch_list() throws RecognitionException {
		return branch_list(0);
	}

	private Branch_listContext branch_list(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Branch_listContext _localctx = new Branch_listContext(_ctx, _parentState);
		Branch_listContext _prevctx = _localctx;
		int _startState = 66;
		enterRecursionRule(_localctx, 66, RULE_branch_list, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigBranchContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(394);
			branch();
			setState(395);
			match(SEMICOLON);
			}
			_ctx.stop = _input.LT(-1);
			setState(403);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,26,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetBranchListContext(new Branch_listContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_branch_list);
					setState(397);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(398);
					branch();
					setState(399);
					match(SEMICOLON);
					}
					} 
				}
				setState(405);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,26,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class BranchContext extends ParserRuleContext {
		public BranchContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_branch; }
	 
		public BranchContext() { }
		public void copyFrom(BranchContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SigBranchContext extends BranchContext {
		public Const_listContext const_list() {
			return getRuleContext(Const_listContext.class,0);
		}
		public TerminalNode COLON() { return getToken(CalcParser.COLON, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public SigBranchContext(BranchContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigBranch(this);
			else return visitor.visitChildren(this);
		}
	}

	public final BranchContext branch() throws RecognitionException {
		BranchContext _localctx = new BranchContext(_ctx, getState());
		enterRule(_localctx, 68, RULE_branch);
		try {
			_localctx = new SigBranchContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(406);
			const_list(0);
			setState(407);
			match(COLON);
			setState(408);
			statement();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Const_listContext extends ParserRuleContext {
		public Const_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_const_list; }
	 
		public Const_listContext() { }
		public void copyFrom(Const_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetConstListContext extends Const_listContext {
		public Const_listContext const_list() {
			return getRuleContext(Const_listContext.class,0);
		}
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public Const_variableContext const_variable() {
			return getRuleContext(Const_variableContext.class,0);
		}
		public GetConstListContext(Const_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetConstList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSigConstContext extends Const_listContext {
		public Const_variableContext const_variable() {
			return getRuleContext(Const_variableContext.class,0);
		}
		public GetSigConstContext(Const_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigConst(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Const_listContext const_list() throws RecognitionException {
		return const_list(0);
	}

	private Const_listContext const_list(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Const_listContext _localctx = new Const_listContext(_ctx, _parentState);
		Const_listContext _prevctx = _localctx;
		int _startState = 70;
		enterRecursionRule(_localctx, 70, RULE_const_list, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigConstContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(411);
			const_variable();
			}
			_ctx.stop = _input.LT(-1);
			setState(418);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,27,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetConstListContext(new Const_listContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_const_list);
					setState(413);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(414);
					match(COMMA);
					setState(415);
					const_variable();
					}
					} 
				}
				setState(420);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,27,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class UpdownContext extends ParserRuleContext {
		public TerminalNode TO() { return getToken(CalcParser.TO, 0); }
		public TerminalNode DOWNTO() { return getToken(CalcParser.DOWNTO, 0); }
		public UpdownContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_updown; }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUpdown(this);
			else return visitor.visitChildren(this);
		}
	}

	public final UpdownContext updown() throws RecognitionException {
		UpdownContext _localctx = new UpdownContext(_ctx, getState());
		enterRule(_localctx, 72, RULE_updown);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(421);
			_la = _input.LA(1);
			if ( !(_la==DOWNTO || _la==TO) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Call_procedure_statementContext extends ParserRuleContext {
		public Call_procedure_statementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_call_procedure_statement; }
	 
		public Call_procedure_statementContext() { }
		public void copyFrom(Call_procedure_statementContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetFuncContext extends Call_procedure_statementContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Expression_listContext expression_list() {
			return getRuleContext(Expression_listContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public GetFuncContext(Call_procedure_statementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetFunc(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetProContext extends Call_procedure_statementContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public GetProContext(Call_procedure_statementContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetPro(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Call_procedure_statementContext call_procedure_statement() throws RecognitionException {
		Call_procedure_statementContext _localctx = new Call_procedure_statementContext(_ctx, getState());
		enterRule(_localctx, 74, RULE_call_procedure_statement);
		try {
			setState(429);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
			case 1:
				_localctx = new GetProContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(423);
				match(ID);
				}
				break;
			case 2:
				_localctx = new GetFuncContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(424);
				match(ID);
				setState(425);
				match(LEFT_BRA);
				setState(426);
				expression_list(0);
				setState(427);
				match(RIGHT_BRA);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Expression_listContext extends ParserRuleContext {
		public Expression_listContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expression_list; }
	 
		public Expression_listContext() { }
		public void copyFrom(Expression_listContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetExpListContext extends Expression_listContext {
		public Expression_listContext expression_list() {
			return getRuleContext(Expression_listContext.class,0);
		}
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public GetExpListContext(Expression_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetExpList(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetSigExpContext extends Expression_listContext {
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public GetSigExpContext(Expression_listContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetSigExp(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Expression_listContext expression_list() throws RecognitionException {
		return expression_list(0);
	}

	private Expression_listContext expression_list(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Expression_listContext _localctx = new Expression_listContext(_ctx, _parentState);
		Expression_listContext _prevctx = _localctx;
		int _startState = 76;
		enterRecursionRule(_localctx, 76, RULE_expression_list, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new GetSigExpContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(432);
			expression();
			}
			_ctx.stop = _input.LT(-1);
			setState(439);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new GetExpListContext(new Expression_listContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_expression_list);
					setState(434);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(435);
					match(COMMA);
					setState(436);
					expression();
					}
					} 
				}
				setState(441);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class ExpressionContext extends ParserRuleContext {
		public ExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expression; }
	 
		public ExpressionContext() { }
		public void copyFrom(ExpressionContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SigSimExpContext extends ExpressionContext {
		public Simple_expressionContext simple_expression() {
			return getRuleContext(Simple_expressionContext.class,0);
		}
		public SigSimExpContext(ExpressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigSimExp(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class RelopSimExpContext extends ExpressionContext {
		public List<Simple_expressionContext> simple_expression() {
			return getRuleContexts(Simple_expressionContext.class);
		}
		public Simple_expressionContext simple_expression(int i) {
			return getRuleContext(Simple_expressionContext.class,i);
		}
		public TerminalNode EQUAL() { return getToken(CalcParser.EQUAL, 0); }
		public TerminalNode RELOP() { return getToken(CalcParser.RELOP, 0); }
		public RelopSimExpContext(ExpressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitRelopSimExp(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ExpressionContext expression() throws RecognitionException {
		ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
		enterRule(_localctx, 78, RULE_expression);
		int _la;
		try {
			setState(447);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
			case 1:
				_localctx = new RelopSimExpContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(442);
				simple_expression(0);
				setState(443);
				_la = _input.LA(1);
				if ( !(_la==EQUAL || _la==RELOP) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(444);
				simple_expression(0);
				}
				break;
			case 2:
				_localctx = new SigSimExpContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(446);
				simple_expression(0);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Simple_expressionContext extends ParserRuleContext {
		public Simple_expressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_simple_expression; }
	 
		public Simple_expressionContext() { }
		public void copyFrom(Simple_expressionContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SigTermContext extends Simple_expressionContext {
		public TermContext term() {
			return getRuleContext(TermContext.class,0);
		}
		public SigTermContext(Simple_expressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigTerm(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SimTermContext extends Simple_expressionContext {
		public Simple_expressionContext simple_expression() {
			return getRuleContext(Simple_expressionContext.class,0);
		}
		public TermContext term() {
			return getRuleContext(TermContext.class,0);
		}
		public TerminalNode OR() { return getToken(CalcParser.OR, 0); }
		public TerminalNode ADD() { return getToken(CalcParser.ADD, 0); }
		public TerminalNode SUB() { return getToken(CalcParser.SUB, 0); }
		public SimTermContext(Simple_expressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSimTerm(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class AddTermContext extends Simple_expressionContext {
		public TerminalNode ADD() { return getToken(CalcParser.ADD, 0); }
		public TermContext term() {
			return getRuleContext(TermContext.class,0);
		}
		public AddTermContext(Simple_expressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitAddTerm(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class SubTermContext extends Simple_expressionContext {
		public TerminalNode SUB() { return getToken(CalcParser.SUB, 0); }
		public TermContext term() {
			return getRuleContext(TermContext.class,0);
		}
		public SubTermContext(Simple_expressionContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSubTerm(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Simple_expressionContext simple_expression() throws RecognitionException {
		return simple_expression(0);
	}

	private Simple_expressionContext simple_expression(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		Simple_expressionContext _localctx = new Simple_expressionContext(_ctx, _parentState);
		Simple_expressionContext _prevctx = _localctx;
		int _startState = 80;
		enterRecursionRule(_localctx, 80, RULE_simple_expression, _p);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(455);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case LEFT_BRA:
			case TRUE:
			case FALSE:
			case NOT:
			case SIGLETTER:
			case ID:
			case NUM:
				{
				_localctx = new SigTermContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;

				setState(450);
				term(0);
				}
				break;
			case ADD:
				{
				_localctx = new AddTermContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;
				setState(451);
				match(ADD);
				setState(452);
				term(0);
				}
				break;
			case SUB:
				{
				_localctx = new SubTermContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;
				setState(453);
				match(SUB);
				setState(454);
				term(0);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
			_ctx.stop = _input.LT(-1);
			setState(462);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,32,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new SimTermContext(new Simple_expressionContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_simple_expression);
					setState(457);
					if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
					setState(458);
					_la = _input.LA(1);
					if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << SUB) | (1L << OR))) != 0)) ) {
					_errHandler.recoverInline(this);
					}
					else {
						if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
						_errHandler.reportMatch(this);
						consume();
					}
					setState(459);
					term(0);
					}
					} 
				}
				setState(464);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,32,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class TermContext extends ParserRuleContext {
		public TermContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_term; }
	 
		public TermContext() { }
		public void copyFrom(TermContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class SigFactorContext extends TermContext {
		public FactorContext factor() {
			return getRuleContext(FactorContext.class,0);
		}
		public SigFactorContext(TermContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitSigFactor(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class MultiFactorContext extends TermContext {
		public TermContext term() {
			return getRuleContext(TermContext.class,0);
		}
		public TerminalNode MULOP() { return getToken(CalcParser.MULOP, 0); }
		public FactorContext factor() {
			return getRuleContext(FactorContext.class,0);
		}
		public MultiFactorContext(TermContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitMultiFactor(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TermContext term() throws RecognitionException {
		return term(0);
	}

	private TermContext term(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		TermContext _localctx = new TermContext(_ctx, _parentState);
		TermContext _prevctx = _localctx;
		int _startState = 82;
		enterRecursionRule(_localctx, 82, RULE_term, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new SigFactorContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(466);
			factor();
			}
			_ctx.stop = _input.LT(-1);
			setState(473);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,33,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new MultiFactorContext(new TermContext(_parentctx, _parentState));
					pushNewRecursionContext(_localctx, _startState, RULE_term);
					setState(468);
					if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
					setState(469);
					match(MULOP);
					setState(470);
					factor();
					}
					} 
				}
				setState(475);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,33,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class FactorContext extends ParserRuleContext {
		public FactorContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_factor; }
	 
		public FactorContext() { }
		public void copyFrom(FactorContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ExpFactorContext extends FactorContext {
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public ExpFactorContext(FactorContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitExpFactor(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class UcvFactorContext extends FactorContext {
		public Unsign_const_variableContext unsign_const_variable() {
			return getRuleContext(Unsign_const_variableContext.class,0);
		}
		public UcvFactorContext(FactorContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUcvFactor(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class NotFactorContext extends FactorContext {
		public TerminalNode NOT() { return getToken(CalcParser.NOT, 0); }
		public FactorContext factor() {
			return getRuleContext(FactorContext.class,0);
		}
		public NotFactorContext(FactorContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitNotFactor(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class VarFactorContext extends FactorContext {
		public VariableContext variable() {
			return getRuleContext(VariableContext.class,0);
		}
		public VarFactorContext(FactorContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitVarFactor(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class FuncFactorContext extends FactorContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Expression_listContext expression_list() {
			return getRuleContext(Expression_listContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public FuncFactorContext(FactorContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitFuncFactor(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FactorContext factor() throws RecognitionException {
		FactorContext _localctx = new FactorContext(_ctx, getState());
		enterRule(_localctx, 84, RULE_factor);
		try {
			setState(489);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
			case 1:
				_localctx = new UcvFactorContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(476);
				unsign_const_variable();
				}
				break;
			case 2:
				_localctx = new VarFactorContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(477);
				variable();
				}
				break;
			case 3:
				_localctx = new FuncFactorContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(478);
				match(ID);
				setState(479);
				match(LEFT_BRA);
				setState(480);
				expression_list(0);
				setState(481);
				match(RIGHT_BRA);
				}
				break;
			case 4:
				_localctx = new ExpFactorContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(483);
				match(LEFT_BRA);
				setState(484);
				expression();
				setState(485);
				match(RIGHT_BRA);
				}
				break;
			case 5:
				_localctx = new NotFactorContext(_localctx);
				enterOuterAlt(_localctx, 5);
				{
				setState(487);
				match(NOT);
				setState(488);
				factor();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Unsign_const_variableContext extends ParserRuleContext {
		public Unsign_const_variableContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_unsign_const_variable; }
	 
		public Unsign_const_variableContext() { }
		public void copyFrom(Unsign_const_variableContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class UnsignConstVariableIDContext extends Unsign_const_variableContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public UnsignConstVariableIDContext(Unsign_const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUnsignConstVariableID(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class UnsignConstVariableLetterContext extends Unsign_const_variableContext {
		public TerminalNode SIGLETTER() { return getToken(CalcParser.SIGLETTER, 0); }
		public UnsignConstVariableLetterContext(Unsign_const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUnsignConstVariableLetter(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class UnsignConstVariableBooleanContext extends Unsign_const_variableContext {
		public BooleanEnumContext booleanEnum() {
			return getRuleContext(BooleanEnumContext.class,0);
		}
		public UnsignConstVariableBooleanContext(Unsign_const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUnsignConstVariableBoolean(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class UnsignConstVariableNumContext extends Unsign_const_variableContext {
		public TerminalNode NUM() { return getToken(CalcParser.NUM, 0); }
		public UnsignConstVariableNumContext(Unsign_const_variableContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitUnsignConstVariableNum(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Unsign_const_variableContext unsign_const_variable() throws RecognitionException {
		Unsign_const_variableContext _localctx = new Unsign_const_variableContext(_ctx, getState());
		enterRule(_localctx, 86, RULE_unsign_const_variable);
		try {
			setState(495);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case ID:
				_localctx = new UnsignConstVariableIDContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(491);
				match(ID);
				}
				break;
			case NUM:
				_localctx = new UnsignConstVariableNumContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(492);
				match(NUM);
				}
				break;
			case SIGLETTER:
				_localctx = new UnsignConstVariableLetterContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(493);
				match(SIGLETTER);
				}
				break;
			case TRUE:
			case FALSE:
				_localctx = new UnsignConstVariableBooleanContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(494);
				booleanEnum();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ReadContext extends ParserRuleContext {
		public ReadContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_read; }
	 
		public ReadContext() { }
		public void copyFrom(ReadContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ReadSomeParaContext extends ReadContext {
		public TerminalNode READ() { return getToken(CalcParser.READ, 0); }
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Para_table_readContext para_table_read() {
			return getRuleContext(Para_table_readContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public ReadSomeParaContext(ReadContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitReadSomePara(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ReadContext read() throws RecognitionException {
		ReadContext _localctx = new ReadContext(_ctx, getState());
		enterRule(_localctx, 88, RULE_read);
		try {
			_localctx = new ReadSomeParaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(497);
			match(READ);
			setState(498);
			match(LEFT_BRA);
			setState(499);
			para_table_read();
			setState(500);
			match(RIGHT_BRA);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class WriteContext extends ParserRuleContext {
		public WriteContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_write; }
	 
		public WriteContext() { }
		public void copyFrom(WriteContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class WriteSomeParaContext extends WriteContext {
		public TerminalNode WRITE() { return getToken(CalcParser.WRITE, 0); }
		public TerminalNode LEFT_BRA() { return getToken(CalcParser.LEFT_BRA, 0); }
		public Para_table_writeContext para_table_write() {
			return getRuleContext(Para_table_writeContext.class,0);
		}
		public TerminalNode RIGHT_BRA() { return getToken(CalcParser.RIGHT_BRA, 0); }
		public WriteSomeParaContext(WriteContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitWriteSomePara(this);
			else return visitor.visitChildren(this);
		}
	}

	public final WriteContext write() throws RecognitionException {
		WriteContext _localctx = new WriteContext(_ctx, getState());
		enterRule(_localctx, 90, RULE_write);
		try {
			_localctx = new WriteSomeParaContext(_localctx);
			enterOuterAlt(_localctx, 1);
			{
			setState(502);
			match(WRITE);
			setState(503);
			match(LEFT_BRA);
			setState(504);
			para_table_write();
			setState(505);
			match(RIGHT_BRA);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Para_table_readContext extends ParserRuleContext {
		public Para_table_readContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_para_table_read; }
	 
		public Para_table_readContext() { }
		public void copyFrom(Para_table_readContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class ReadParaTableContext extends Para_table_readContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public Para_table_readContext para_table_read() {
			return getRuleContext(Para_table_readContext.class,0);
		}
		public ReadParaTableContext(Para_table_readContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitReadParaTable(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class ReadParaContext extends Para_table_readContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public ReadParaContext(Para_table_readContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitReadPara(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Para_table_readContext para_table_read() throws RecognitionException {
		Para_table_readContext _localctx = new Para_table_readContext(_ctx, getState());
		enterRule(_localctx, 92, RULE_para_table_read);
		try {
			setState(511);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
			case 1:
				_localctx = new ReadParaTableContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(507);
				match(ID);
				setState(508);
				match(COMMA);
				setState(509);
				para_table_read();
				}
				break;
			case 2:
				_localctx = new ReadParaContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(510);
				match(ID);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Para_table_writeContext extends ParserRuleContext {
		public Para_table_writeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_para_table_write; }
	 
		public Para_table_writeContext() { }
		public void copyFrom(Para_table_writeContext ctx) {
			super.copyFrom(ctx);
		}
	}
	public static class GetWriteParaContext extends Para_table_writeContext {
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public GetWriteParaContext(Para_table_writeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetWritePara(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetWriteStringContext extends Para_table_writeContext {
		public TerminalNode SIG_STRING() { return getToken(CalcParser.SIG_STRING, 0); }
		public GetWriteStringContext(Para_table_writeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetWriteString(this);
			else return visitor.visitChildren(this);
		}
	}
	public static class GetWriteParaTableContext extends Para_table_writeContext {
		public TerminalNode COMMA() { return getToken(CalcParser.COMMA, 0); }
		public Para_table_writeContext para_table_write() {
			return getRuleContext(Para_table_writeContext.class,0);
		}
		public TerminalNode ID() { return getToken(CalcParser.ID, 0); }
		public TerminalNode SIG_STRING() { return getToken(CalcParser.SIG_STRING, 0); }
		public GetWriteParaTableContext(Para_table_writeContext ctx) { copyFrom(ctx); }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitGetWriteParaTable(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Para_table_writeContext para_table_write() throws RecognitionException {
		Para_table_writeContext _localctx = new Para_table_writeContext(_ctx, getState());
		enterRule(_localctx, 94, RULE_para_table_write);
		int _la;
		try {
			setState(518);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
			case 1:
				_localctx = new GetWriteParaTableContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(513);
				_la = _input.LA(1);
				if ( !(_la==ID || _la==SIG_STRING) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(514);
				match(COMMA);
				setState(515);
				para_table_write();
				}
				break;
			case 2:
				_localctx = new GetWriteParaContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(516);
				match(ID);
				}
				break;
			case 3:
				_localctx = new GetWriteStringContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(517);
				match(SIG_STRING);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BooleanEnumContext extends ParserRuleContext {
		public TerminalNode TRUE() { return getToken(CalcParser.TRUE, 0); }
		public TerminalNode FALSE() { return getToken(CalcParser.FALSE, 0); }
		public BooleanEnumContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanEnum; }
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof CalcVisitor ) return ((CalcVisitor<? extends T>)visitor).visitBooleanEnum(this);
			else return visitor.visitChildren(this);
		}
	}

	public final BooleanEnumContext booleanEnum() throws RecognitionException {
		BooleanEnumContext _localctx = new BooleanEnumContext(_ctx, getState());
		enterRule(_localctx, 96, RULE_booleanEnum);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(520);
			_la = _input.LA(1);
			if ( !(_la==TRUE || _la==FALSE) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
		switch (ruleIndex) {
		case 4:
			return identifier_list_sempred((Identifier_listContext)_localctx, predIndex);
		case 6:
			return const_declaration_sempred((Const_declarationContext)_localctx, predIndex);
		case 9:
			return type_declaration_sempred((Type_declarationContext)_localctx, predIndex);
		case 13:
			return periods_sempred((PeriodsContext)_localctx, predIndex);
		case 16:
			return var_declaration_sempred((Var_declarationContext)_localctx, predIndex);
		case 17:
			return subprogram_declarations_sempred((Subprogram_declarationsContext)_localctx, predIndex);
		case 21:
			return parameter_lists_sempred((Parameter_listsContext)_localctx, predIndex);
		case 26:
			return statement_list_sempred((Statement_listContext)_localctx, predIndex);
		case 29:
			return id_varparts_sempred((Id_varpartsContext)_localctx, predIndex);
		case 33:
			return branch_list_sempred((Branch_listContext)_localctx, predIndex);
		case 35:
			return const_list_sempred((Const_listContext)_localctx, predIndex);
		case 38:
			return expression_list_sempred((Expression_listContext)_localctx, predIndex);
		case 40:
			return simple_expression_sempred((Simple_expressionContext)_localctx, predIndex);
		case 41:
			return term_sempred((TermContext)_localctx, predIndex);
		}
		return true;
	}
	private boolean identifier_list_sempred(Identifier_listContext _localctx, int predIndex) {
		switch (predIndex) {
		case 0:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean const_declaration_sempred(Const_declarationContext _localctx, int predIndex) {
		switch (predIndex) {
		case 1:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean type_declaration_sempred(Type_declarationContext _localctx, int predIndex) {
		switch (predIndex) {
		case 2:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean periods_sempred(PeriodsContext _localctx, int predIndex) {
		switch (predIndex) {
		case 3:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean var_declaration_sempred(Var_declarationContext _localctx, int predIndex) {
		switch (predIndex) {
		case 4:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean subprogram_declarations_sempred(Subprogram_declarationsContext _localctx, int predIndex) {
		switch (predIndex) {
		case 5:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean parameter_lists_sempred(Parameter_listsContext _localctx, int predIndex) {
		switch (predIndex) {
		case 6:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean statement_list_sempred(Statement_listContext _localctx, int predIndex) {
		switch (predIndex) {
		case 7:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean id_varparts_sempred(Id_varpartsContext _localctx, int predIndex) {
		switch (predIndex) {
		case 8:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean branch_list_sempred(Branch_listContext _localctx, int predIndex) {
		switch (predIndex) {
		case 9:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean const_list_sempred(Const_listContext _localctx, int predIndex) {
		switch (predIndex) {
		case 10:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean expression_list_sempred(Expression_listContext _localctx, int predIndex) {
		switch (predIndex) {
		case 11:
			return precpred(_ctx, 2);
		}
		return true;
	}
	private boolean simple_expression_sempred(Simple_expressionContext _localctx, int predIndex) {
		switch (predIndex) {
		case 12:
			return precpred(_ctx, 4);
		}
		return true;
	}
	private boolean term_sempred(TermContext _localctx, int predIndex) {
		switch (predIndex) {
		case 13:
			return precpred(_ctx, 2);
		}
		return true;
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3@\u020d\4\2\t\2\4"+
		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
		"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
		"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
		"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
		",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\3\2\3\2\3\3\3\3\3"+
		"\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\5\5s\n\5\3\5\5\5v\n\5\3\5\5\5y"+
		"\n\5\3\5\5\5|\n\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6\u0086\n\6\f\6\16"+
		"\6\u0089\13\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b"+
		"\7\b\u0099\n\b\f\b\16\b\u009c\13\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+
		"\3\t\3\t\5\t\u00a9\n\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3"+
		"\13\3\13\3\13\3\13\7\13\u00b9\n\13\f\13\16\13\u00bc\13\13\3\f\3\f\3\f"+
		"\5\f\u00c1\n\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00cc\n\f\3\r\3"+
		"\r\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\7\17\u00d8\n\17\f\17\16\17"+
		"\u00db\13\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3"+
		"\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\7\22\u00f0\n\22\f\22\16\22\u00f3"+
		"\13\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u00fd\n\23\f\23\16"+
		"\23\u0100\13\23\3\24\3\24\3\24\3\25\3\25\3\25\5\25\u0108\n\25\3\25\3\25"+
		"\3\25\3\25\3\25\3\25\3\25\5\25\u0111\n\25\3\25\5\25\u0114\n\25\3\26\3"+
		"\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u0120\n\27\f\27\16\27"+
		"\u0123\13\27\3\30\3\30\5\30\u0127\n\30\3\31\3\31\3\31\3\32\3\32\3\32\3"+
		"\32\3\33\3\33\3\33\3\33\3\33\3\33\5\33\u0136\n\33\3\34\3\34\3\34\3\34"+
		"\3\34\3\34\3\34\3\34\7\34\u0140\n\34\f\34\16\34\u0143\13\34\3\35\3\35"+
		"\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u0152\n\35"+
		"\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35"+
		"\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u016d\n\35"+
		"\3\36\3\36\3\36\5\36\u0172\n\36\3\37\3\37\3\37\3\37\3\37\7\37\u0179\n"+
		"\37\f\37\16\37\u017c\13\37\3 \3 \3 \3 \3 \3 \5 \u0184\n \3!\3!\3!\3\""+
		"\5\"\u018a\n\"\3#\3#\3#\3#\3#\3#\3#\3#\7#\u0194\n#\f#\16#\u0197\13#\3"+
		"$\3$\3$\3$\3%\3%\3%\3%\3%\3%\7%\u01a3\n%\f%\16%\u01a6\13%\3&\3&\3\'\3"+
		"\'\3\'\3\'\3\'\3\'\5\'\u01b0\n\'\3(\3(\3(\3(\3(\3(\7(\u01b8\n(\f(\16("+
		"\u01bb\13(\3)\3)\3)\3)\3)\5)\u01c2\n)\3*\3*\3*\3*\3*\3*\5*\u01ca\n*\3"+
		"*\3*\3*\7*\u01cf\n*\f*\16*\u01d2\13*\3+\3+\3+\3+\3+\3+\7+\u01da\n+\f+"+
		"\16+\u01dd\13+\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\5,\u01ec\n,\3-\3"+
		"-\3-\3-\5-\u01f2\n-\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3\60\3\60\3\60\3\60"+
		"\5\60\u0202\n\60\3\61\3\61\3\61\3\61\3\61\5\61\u0209\n\61\3\62\3\62\3"+
		"\62\2\20\n\16\24\34\"$,\66<DHNRT\63\2\4\6\b\n\f\16\20\22\24\26\30\32\34"+
		"\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`b\2\b\6\2\32\32%%,,\65\65"+
		"\4\2\37\37\60\60\4\2\22\22==\4\2\5\6))\4\2\67\67??\3\2\23\24\2\u0217\2"+
		"d\3\2\2\2\4f\3\2\2\2\6j\3\2\2\2\br\3\2\2\2\n\177\3\2\2\2\f\u008a\3\2\2"+
		"\2\16\u008e\3\2\2\2\20\u00a8\3\2\2\2\22\u00aa\3\2\2\2\24\u00ae\3\2\2\2"+
		"\26\u00cb\3\2\2\2\30\u00cd\3\2\2\2\32\u00cf\3\2\2\2\34\u00d1\3\2\2\2\36"+
		"\u00dc\3\2\2\2 \u00e0\3\2\2\2\"\u00e3\3\2\2\2$\u00f4\3\2\2\2&\u0101\3"+
		"\2\2\2(\u0113\3\2\2\2*\u0115\3\2\2\2,\u0119\3\2\2\2.\u0126\3\2\2\2\60"+
		"\u0128\3\2\2\2\62\u012b\3\2\2\2\64\u0135\3\2\2\2\66\u0137\3\2\2\28\u016c"+
		"\3\2\2\2:\u0171\3\2\2\2<\u0173\3\2\2\2>\u0183\3\2\2\2@\u0185\3\2\2\2B"+
		"\u0189\3\2\2\2D\u018b\3\2\2\2F\u0198\3\2\2\2H\u019c\3\2\2\2J\u01a7\3\2"+
		"\2\2L\u01af\3\2\2\2N\u01b1\3\2\2\2P\u01c1\3\2\2\2R\u01c9\3\2\2\2T\u01d3"+
		"\3\2\2\2V\u01eb\3\2\2\2X\u01f1\3\2\2\2Z\u01f3\3\2\2\2\\\u01f8\3\2\2\2"+
		"^\u0201\3\2\2\2`\u0208\3\2\2\2b\u020a\3\2\2\2de\7\2\2\3e\3\3\2\2\2fg\5"+
		"\6\4\2gh\5\b\5\2hi\7\17\2\2i\5\3\2\2\2jk\7+\2\2kl\7\67\2\2lm\7\t\2\2m"+
		"n\5\n\6\2no\7\n\2\2op\7\21\2\2p\7\3\2\2\2qs\5\f\7\2rq\3\2\2\2rs\3\2\2"+
		"\2su\3\2\2\2tv\5\22\n\2ut\3\2\2\2uv\3\2\2\2vx\3\2\2\2wy\5 \21\2xw\3\2"+
		"\2\2xy\3\2\2\2y{\3\2\2\2z|\5$\23\2{z\3\2\2\2{|\3\2\2\2|}\3\2\2\2}~\5\64"+
		"\33\2~\t\3\2\2\2\177\u0080\b\6\1\2\u0080\u0081\7\67\2\2\u0081\u0087\3"+
		"\2\2\2\u0082\u0083\f\4\2\2\u0083\u0084\7\r\2\2\u0084\u0086\7\67\2\2\u0085"+
		"\u0082\3\2\2\2\u0086\u0089\3\2\2\2\u0087\u0085\3\2\2\2\u0087\u0088\3\2"+
		"\2\2\u0088\13\3\2\2\2\u0089\u0087\3\2\2\2\u008a\u008b\7\34\2\2\u008b\u008c"+
		"\5\16\b\2\u008c\u008d\7\21\2\2\u008d\r\3\2\2\2\u008e\u008f\b\b\1\2\u008f"+
		"\u0090\7\67\2\2\u0090\u0091\7\22\2\2\u0091\u0092\5\20\t\2\u0092\u009a"+
		"\3\2\2\2\u0093\u0094\f\4\2\2\u0094\u0095\7\21\2\2\u0095\u0096\7\67\2\2"+
		"\u0096\u0097\7\22\2\2\u0097\u0099\5\20\t\2\u0098\u0093\3\2\2\2\u0099\u009c"+
		"\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b\17\3\2\2\2\u009c"+
		"\u009a\3\2\2\2\u009d\u009e\7\5\2\2\u009e\u00a9\7\67\2\2\u009f\u00a0\7"+
		"\6\2\2\u00a0\u00a9\7\67\2\2\u00a1\u00a9\7\67\2\2\u00a2\u00a3\7\5\2\2\u00a3"+
		"\u00a9\78\2\2\u00a4\u00a5\7\6\2\2\u00a5\u00a9\78\2\2\u00a6\u00a9\78\2"+
		"\2\u00a7\u00a9\7\66\2\2\u00a8\u009d\3\2\2\2\u00a8\u009f\3\2\2\2\u00a8"+
		"\u00a1\3\2\2\2\u00a8\u00a2\3\2\2\2\u00a8\u00a4\3\2\2\2\u00a8\u00a6\3\2"+
		"\2\2\u00a8\u00a7\3\2\2\2\u00a9\21\3\2\2\2\u00aa\u00ab\7\61\2\2\u00ab\u00ac"+
		"\5\24\13\2\u00ac\u00ad\7\21\2\2\u00ad\23\3\2\2\2\u00ae\u00af\b\13\1\2"+
		"\u00af\u00b0\7\67\2\2\u00b0\u00b1\7\22\2\2\u00b1\u00b2\5\26\f\2\u00b2"+
		"\u00ba\3\2\2\2\u00b3\u00b4\f\4\2\2\u00b4\u00b5\7\21\2\2\u00b5\u00b6\7"+
		"\67\2\2\u00b6\u00b7\7\22\2\2\u00b7\u00b9\5\26\f\2\u00b8\u00b3\3\2\2\2"+
		"\u00b9\u00bc\3\2\2\2\u00ba\u00b8\3\2\2\2\u00ba\u00bb\3\2\2\2\u00bb\25"+
		"\3\2\2\2\u00bc\u00ba\3\2\2\2\u00bd\u00cc\5\30\r\2\u00be\u00c0\7-\2\2\u00bf"+
		"\u00c1\5\32\16\2\u00c0\u00bf\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c2\3"+
		"\2\2\2\u00c2\u00cc\7!\2\2\u00c3\u00c4\7\30\2\2\u00c4\u00c5\7\13\2\2\u00c5"+
		"\u00c6\5\34\17\2\u00c6\u00c7\7\f\2\2\u00c7\u00c8\7(\2\2\u00c8\u00c9\5"+
		"\26\f\2\u00c9\u00cc\3\2\2\2\u00ca\u00cc\7\67\2\2\u00cb\u00bd\3\2\2\2\u00cb"+
		"\u00be\3\2\2\2\u00cb\u00c3\3\2\2\2\u00cb\u00ca\3\2\2\2\u00cc\27\3\2\2"+
		"\2\u00cd\u00ce\t\2\2\2\u00ce\31\3\2\2\2\u00cf\u00d0\5\"\22\2\u00d0\33"+
		"\3\2\2\2\u00d1\u00d2\b\17\1\2\u00d2\u00d3\5\36\20\2\u00d3\u00d9\3\2\2"+
		"\2\u00d4\u00d5\f\4\2\2\u00d5\u00d6\7\r\2\2\u00d6\u00d8\5\36\20\2\u00d7"+
		"\u00d4\3\2\2\2\u00d8\u00db\3\2\2\2\u00d9\u00d7\3\2\2\2\u00d9\u00da\3\2"+
		"\2\2\u00da\35\3\2\2\2\u00db\u00d9\3\2\2\2\u00dc\u00dd\5\20\t\2\u00dd\u00de"+
		"\7\20\2\2\u00de\u00df\5\20\t\2\u00df\37\3\2\2\2\u00e0\u00e1\7\63\2\2\u00e1"+
		"\u00e2\5\"\22\2\u00e2!\3\2\2\2\u00e3\u00e4\b\22\1\2\u00e4\u00e5\5\n\6"+
		"\2\u00e5\u00e6\7\16\2\2\u00e6\u00e7\5\26\f\2\u00e7\u00e8\7\21\2\2\u00e8"+
		"\u00f1\3\2\2\2\u00e9\u00ea\f\4\2\2\u00ea\u00eb\5\n\6\2\u00eb\u00ec\7\16"+
		"\2\2\u00ec\u00ed\5\26\f\2\u00ed\u00ee\7\21\2\2\u00ee\u00f0\3\2\2\2\u00ef"+
		"\u00e9\3\2\2\2\u00f0\u00f3\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f1\u00f2\3\2"+
		"\2\2\u00f2#\3\2\2\2\u00f3\u00f1\3\2\2\2\u00f4\u00f5\b\23\1\2\u00f5\u00f6"+
		"\5&\24\2\u00f6\u00f7\7\21\2\2\u00f7\u00fe\3\2\2\2\u00f8\u00f9\f\4\2\2"+
		"\u00f9\u00fa\5&\24\2\u00fa\u00fb\7\21\2\2\u00fb\u00fd\3\2\2\2\u00fc\u00f8"+
		"\3\2\2\2\u00fd\u0100\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00ff\3\2\2\2\u00ff"+
		"%\3\2\2\2\u0100\u00fe\3\2\2\2\u0101\u0102\5(\25\2\u0102\u0103\5\b\5\2"+
		"\u0103\'\3\2\2\2\u0104\u0105\7#\2\2\u0105\u0107\7\67\2\2\u0106\u0108\5"+
		"*\26\2\u0107\u0106\3\2\2\2\u0107\u0108\3\2\2\2\u0108\u0109\3\2\2\2\u0109"+
		"\u010a\7\16\2\2\u010a\u010b\5\30\r\2\u010b\u010c\7\21\2\2\u010c\u0114"+
		"\3\2\2\2\u010d\u010e\7*\2\2\u010e\u0110\7\67\2\2\u010f\u0111\5*\26\2\u0110"+
		"\u010f\3\2\2\2\u0110\u0111\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0114\7\21"+
		"\2\2\u0113\u0104\3\2\2\2\u0113\u010d\3\2\2\2\u0114)\3\2\2\2\u0115\u0116"+
		"\7\t\2\2\u0116\u0117\5,\27\2\u0117\u0118\7\n\2\2\u0118+\3\2\2\2\u0119"+
		"\u011a\b\27\1\2\u011a\u011b\5.\30\2\u011b\u0121\3\2\2\2\u011c\u011d\f"+
		"\4\2\2\u011d\u011e\7\21\2\2\u011e\u0120\5.\30\2\u011f\u011c\3\2\2\2\u0120"+
		"\u0123\3\2\2\2\u0121\u011f\3\2\2\2\u0121\u0122\3\2\2\2\u0122-\3\2\2\2"+
		"\u0123\u0121\3\2\2\2\u0124\u0127\5\60\31\2\u0125\u0127\5\62\32\2\u0126"+
		"\u0124\3\2\2\2\u0126\u0125\3\2\2\2\u0127/\3\2\2\2\u0128\u0129\7\63\2\2"+
		"\u0129\u012a\5\62\32\2\u012a\61\3\2\2\2\u012b\u012c\5\n\6\2\u012c\u012d"+
		"\7\16\2\2\u012d\u012e\5\30\r\2\u012e\63\3\2\2\2\u012f\u0130\7\31\2\2\u0130"+
		"\u0131\5\66\34\2\u0131\u0132\7!\2\2\u0132\u0136\3\2\2\2\u0133\u0134\7"+
		"\31\2\2\u0134\u0136\7!\2\2\u0135\u012f\3\2\2\2\u0135\u0133\3\2\2\2\u0136"+
		"\65\3\2\2\2\u0137\u0138\b\34\1\2\u0138\u0139\58\35\2\u0139\u013a\7\21"+
		"\2\2\u013a\u0141\3\2\2\2\u013b\u013c\f\4\2\2\u013c\u013d\58\35\2\u013d"+
		"\u013e\7\21\2\2\u013e\u0140\3\2\2\2\u013f\u013b\3\2\2\2\u0140\u0143\3"+
		"\2\2\2\u0141\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\67\3\2\2\2\u0143"+
		"\u0141\3\2\2\2\u0144\u0145\5:\36\2\u0145\u0146\7>\2\2\u0146\u0147\5P)"+
		"\2\u0147\u016d\3\2\2\2\u0148\u016d\5L\'\2\u0149\u016d\5\64\33\2\u014a"+
		"\u016d\5\\/\2\u014b\u016d\5Z.\2\u014c\u014d\7$\2\2\u014d\u014e\5P)\2\u014e"+
		"\u014f\7/\2\2\u014f\u0151\58\35\2\u0150\u0152\5@!\2\u0151\u0150\3\2\2"+
		"\2\u0151\u0152\3\2\2\2\u0152\u016d\3\2\2\2\u0153\u0154\7\33\2\2\u0154"+
		"\u0155\5P)\2\u0155\u0156\7(\2\2\u0156\u0157\5B\"\2\u0157\u0158\7!\2\2"+
		"\u0158\u016d\3\2\2\2\u0159\u015a\7\64\2\2\u015a\u015b\5P)\2\u015b\u015c"+
		"\7\36\2\2\u015c\u015d\58\35\2\u015d\u016d\3\2\2\2\u015e\u015f\7.\2\2\u015f"+
		"\u0160\5\66\34\2\u0160\u0161\7\62\2\2\u0161\u0162\5P)\2\u0162\u016d\3"+
		"\2\2\2\u0163\u0164\7\"\2\2\u0164\u0165\7\67\2\2\u0165\u0166\7>\2\2\u0166"+
		"\u0167\5P)\2\u0167\u0168\5J&\2\u0168\u0169\5P)\2\u0169\u016a\7\36\2\2"+
		"\u016a\u016b\58\35\2\u016b\u016d\3\2\2\2\u016c\u0144\3\2\2\2\u016c\u0148"+
		"\3\2\2\2\u016c\u0149\3\2\2\2\u016c\u014a\3\2\2\2\u016c\u014b\3\2\2\2\u016c"+
		"\u014c\3\2\2\2\u016c\u0153\3\2\2\2\u016c\u0159\3\2\2\2\u016c\u015e\3\2"+
		"\2\2\u016c\u0163\3\2\2\2\u016d9\3\2\2\2\u016e\u016f\7\67\2\2\u016f\u0172"+
		"\5<\37\2\u0170\u0172\7\67\2\2\u0171\u016e\3\2\2\2\u0171\u0170\3\2\2\2"+
		"\u0172;\3\2\2\2\u0173\u0174\b\37\1\2\u0174\u0175\5> \2\u0175\u017a\3\2"+
		"\2\2\u0176\u0177\f\4\2\2\u0177\u0179\5> \2\u0178\u0176\3\2\2\2\u0179\u017c"+
		"\3\2\2\2\u017a\u0178\3\2\2\2\u017a\u017b\3\2\2\2\u017b=\3\2\2\2\u017c"+
		"\u017a\3\2\2\2\u017d\u017e\7\13\2\2\u017e\u017f\5N(\2\u017f\u0180\7\f"+
		"\2\2\u0180\u0184\3\2\2\2\u0181\u0182\7\17\2\2\u0182\u0184\7\67\2\2\u0183"+
		"\u017d\3\2\2\2\u0183\u0181\3\2\2\2\u0184?\3\2\2\2\u0185\u0186\7 \2\2\u0186"+
		"\u0187\58\35\2\u0187A\3\2\2\2\u0188\u018a\5D#\2\u0189\u0188\3\2\2\2\u0189"+
		"\u018a\3\2\2\2\u018aC\3\2\2\2\u018b\u018c\b#\1\2\u018c\u018d\5F$\2\u018d"+
		"\u018e\7\21\2\2\u018e\u0195\3\2\2\2\u018f\u0190\f\4\2\2\u0190\u0191\5"+
		"F$\2\u0191\u0192\7\21\2\2\u0192\u0194\3\2\2\2\u0193\u018f\3\2\2\2\u0194"+
		"\u0197\3\2\2\2\u0195\u0193\3\2\2\2\u0195\u0196\3\2\2\2\u0196E\3\2\2\2"+
		"\u0197\u0195\3\2\2\2\u0198\u0199\5H%\2\u0199\u019a\7\16\2\2\u019a\u019b"+
		"\58\35\2\u019bG\3\2\2\2\u019c\u019d\b%\1\2\u019d\u019e\5\20\t\2\u019e"+
		"\u01a4\3\2\2\2\u019f\u01a0\f\4\2\2\u01a0\u01a1\7\r\2\2\u01a1\u01a3\5\20"+
		"\t\2\u01a2\u019f\3\2\2\2\u01a3\u01a6\3\2\2\2\u01a4\u01a2\3\2\2\2\u01a4"+
		"\u01a5\3\2\2\2\u01a5I\3\2\2\2\u01a6\u01a4\3\2\2\2\u01a7\u01a8\t\3\2\2"+
		"\u01a8K\3\2\2\2\u01a9\u01b0\7\67\2\2\u01aa\u01ab\7\67\2\2\u01ab\u01ac"+
		"\7\t\2\2\u01ac\u01ad\5N(\2\u01ad\u01ae\7\n\2\2\u01ae\u01b0\3\2\2\2\u01af"+
		"\u01a9\3\2\2\2\u01af\u01aa\3\2\2\2\u01b0M\3\2\2\2\u01b1\u01b2\b(\1\2\u01b2"+
		"\u01b3\5P)\2\u01b3\u01b9\3\2\2\2\u01b4\u01b5\f\4\2\2\u01b5\u01b6\7\r\2"+
		"\2\u01b6\u01b8\5P)\2\u01b7\u01b4\3\2\2\2\u01b8\u01bb\3\2\2\2\u01b9\u01b7"+
		"\3\2\2\2\u01b9\u01ba\3\2\2\2\u01baO\3\2\2\2\u01bb\u01b9\3\2\2\2\u01bc"+
		"\u01bd\5R*\2\u01bd\u01be\t\4\2\2\u01be\u01bf\5R*\2\u01bf\u01c2\3\2\2\2"+
		"\u01c0\u01c2\5R*\2\u01c1\u01bc\3\2\2\2\u01c1\u01c0\3\2\2\2\u01c2Q\3\2"+
		"\2\2\u01c3\u01c4\b*\1\2\u01c4\u01ca\5T+\2\u01c5\u01c6\7\5\2\2\u01c6\u01ca"+
		"\5T+\2\u01c7\u01c8\7\6\2\2\u01c8\u01ca\5T+\2\u01c9\u01c3\3\2\2\2\u01c9"+
		"\u01c5\3\2\2\2\u01c9\u01c7\3\2\2\2\u01ca\u01d0\3\2\2\2\u01cb\u01cc\f\6"+
		"\2\2\u01cc\u01cd\t\5\2\2\u01cd\u01cf\5T+\2\u01ce\u01cb\3\2\2\2\u01cf\u01d2"+
		"\3\2\2\2\u01d0\u01ce\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d1S\3\2\2\2\u01d2"+
		"\u01d0\3\2\2\2\u01d3\u01d4\b+\1\2\u01d4\u01d5\5V,\2\u01d5\u01db\3\2\2"+
		"\2\u01d6\u01d7\f\4\2\2\u01d7\u01d8\7\7\2\2\u01d8\u01da\5V,\2\u01d9\u01d6"+
		"\3\2\2\2\u01da\u01dd\3\2\2\2\u01db\u01d9\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc"+
		"U\3\2\2\2\u01dd\u01db\3\2\2\2\u01de\u01ec\5X-\2\u01df\u01ec\5:\36\2\u01e0"+
		"\u01e1\7\67\2\2\u01e1\u01e2\7\t\2\2\u01e2\u01e3\5N(\2\u01e3\u01e4\7\n"+
		"\2\2\u01e4\u01ec\3\2\2\2\u01e5\u01e6\7\t\2\2\u01e6\u01e7\5P)\2\u01e7\u01e8"+
		"\7\n\2\2\u01e8\u01ec\3\2\2\2\u01e9\u01ea\7\'\2\2\u01ea\u01ec\5V,\2\u01eb"+
		"\u01de\3\2\2\2\u01eb\u01df\3\2\2\2\u01eb\u01e0\3\2\2\2\u01eb\u01e5\3\2"+
		"\2\2\u01eb\u01e9\3\2\2\2\u01ecW\3\2\2\2\u01ed\u01f2\7\67\2\2\u01ee\u01f2"+
		"\78\2\2\u01ef\u01f2\7\66\2\2\u01f0\u01f2\5b\62\2\u01f1\u01ed\3\2\2\2\u01f1"+
		"\u01ee\3\2\2\2\u01f1\u01ef\3\2\2\2\u01f1\u01f0\3\2\2\2\u01f2Y\3\2\2\2"+
		"\u01f3\u01f4\7\25\2\2\u01f4\u01f5\7\t\2\2\u01f5\u01f6\5^\60\2\u01f6\u01f7"+
		"\7\n\2\2\u01f7[\3\2\2\2\u01f8\u01f9\7\26\2\2\u01f9\u01fa\7\t\2\2\u01fa"+
		"\u01fb\5`\61\2\u01fb\u01fc\7\n\2\2\u01fc]\3\2\2\2\u01fd\u01fe\7\67\2\2"+
		"\u01fe\u01ff\7\r\2\2\u01ff\u0202\5^\60\2\u0200\u0202\7\67\2\2\u0201\u01fd"+
		"\3\2\2\2\u0201\u0200\3\2\2\2\u0202_\3\2\2\2\u0203\u0204\t\6\2\2\u0204"+
		"\u0205\7\r\2\2\u0205\u0209\5`\61\2\u0206\u0209\7\67\2\2\u0207\u0209\7"+
		"?\2\2\u0208\u0203\3\2\2\2\u0208\u0206\3\2\2\2\u0208\u0207\3\2\2\2\u0209"+
		"a\3\2\2\2\u020a\u020b\t\7\2\2\u020bc\3\2\2\2(rux{\u0087\u009a\u00a8\u00ba"+
		"\u00c0\u00cb\u00d9\u00f1\u00fe\u0107\u0110\u0113\u0121\u0126\u0135\u0141"+
		"\u0151\u016c\u0171\u017a\u0183\u0189\u0195\u01a4\u01af\u01b9\u01c1\u01c9"+
		"\u01d0\u01db\u01eb\u01f1\u0201\u0208";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}